package com.situ.water_pay.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.situ.water_pay.pojo.PyBill;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.situ.water_pay.vo.FundRecovery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.time.Month;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author Angel
 * @since 2020-12-01
 */
@Mapper
@Repository
public interface PyBillMapper extends BaseMapper<PyBill> {
    //查询水费单最早的时间
    Date getMaxDate();

    //查询交费单最晚的时间
    Date getMinDate();
    
    //月资金回收情况报表
    List<FundRecovery> getFundRecovery(@Param("yaer") String yaer);

    //用户预收费情况报表
    List<FundRecovery> getUserProjectedFees(@Param("amount") Integer amount);

    //用户欠费情况查询
    IPage<PyBill> getUserArrears(Page<PyBill> billPage, String[] volumes, String minDate, String maxDate, String sortField);
}
